<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var o = {
        name:'frank',
        age:20
    };

    function Foo(){
//        console.log(this);
        this.aa = 'aaaa';
    }

//    Foo();
//    Foo.call(o)

    //构造函数
    function Boo(){
        this.legs = 2;
        Foo.call(this)
    }
    var b = new Boo();
</script>
</body>
</html>